import { MockMethod } from "vite-plugin-mock";
import TypeVO from "../../src/bean/vo/TypeVO";

const data: TypeVO[] = [
  { id: 1, name: 'Project', displayName: '项目' },
  { id: 2, name: 'Requirement', displayName: '需求' },
];

export default<MockMethod[]> [
  {
    url: '/api/setting/type/getList',
    method: 'get',
    timeout: 600,
    response: ({ body }) => {
      return {
        result: true,
        code: 200,
        data: data
      }
    }
  },
  {
    url: '/api/setting/type/save',
    method: 'post',
    timeout: 600,
    response: ({ body }) => {
      return {
        result: true,
        code: 200,
        data: '保存成功'
      }
    }
  },
  {
    url: '/api/setting/type/delete',
    method: 'delete',
    timeout: 600,
    response: ({ body }) => {
      return {
        result: true,
        code: 200,
        data: '删除成功'
      }
    }
  }
]
